package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.system.vo.CaseDetailVo;
import com.ruoyi.system.domain.CasesGen;
import com.ruoyi.system.domain.CasesGenExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CasesGenMapper extends BaseMapper<CasesGen> {

    /**
     * MyBatis-Plus 分页查询：根据条件查询案例分页数据
     * @param page 分页对象（传入 pageNum/pageSize）
     * @param vo 查询条件（面积、风格、日期等）
     * @return 分页结果（含总条数、当前页数据）
     */
    IPage<CasesGen> selectCasePage(
            Page<CasesGen> page,
            @Param("vo") CaseDetailVo vo
    );
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cases
     *
     * @mbg.generated
     */
    long countByExample(CasesGenExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cases
     *
     * @mbg.generated
     */
    int deleteByExample(CasesGenExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cases
     *
     * @mbg.generated
     */
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cases
     *
     * @mbg.generated
     */
    int insert(CasesGen record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cases
     *
     * @mbg.generated
     */
    int insertSelective(CasesGen record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cases
     *
     * @mbg.generated
     */
    List<CasesGen> selectByExample(CasesGenExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cases
     *
     * @mbg.generated
     */
    CasesGen selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cases
     *
     * @mbg.generated
     */
    int updateByExampleSelective(@Param("record") CasesGen record, @Param("example") CasesGenExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cases
     *
     * @mbg.generated
     */
    int updateByExample(@Param("record") CasesGen record, @Param("example") CasesGenExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cases
     *
     * @mbg.generated
     */
    int updateByPrimaryKeySelective(CasesGen record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cases
     *
     * @mbg.generated
     */
    int updateByPrimaryKey(CasesGen record);
}